home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
os2
/
adaptor.zip
/
ADAPT.ZIP
/
adaptor
/
examples
/
hpf_gen
/
pi
/
prompt.fcm
< prev
next >
Wrap
Text File
|
1993-03-23
|
843b
|
39 lines
c
c prompt.f 91/21/11
c
c Function which prompts the user for the integration parameters
c
integer*4 function userinpt (a, b, points)
double precision a, b
integer*4 points
integer*4 i
print *, ' '
print *, '******************** INTEGRATION EXAMPLE ***********************'
print *
print *, 'This Example uses the iPSC to calculate pi by integrating '
print *, 'the function:'
print *, ' f(x) = 4 / (1 + x**2)'
print *, 'between x=0 and x=1.'
print *, 'The method used is the n-point rectangle quadrature rule.'
print *
write(6,99)
99 format(' How many points do you want (0 or neg. value quits)? ')
read (5, 110) points
110 format(i10)
a = 0.0
b = 1.0
i = 0
if (points .gt. 0) then
i = 1
else
i = 0
endif
userinpt = i
return
end